home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / dbase / do1beta.zip / CLASSLIB.DOC < prev    next >
Text File  |  1991-08-23  |  85KB  |  1,561 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.                   dObject Version 1.0 Class Library Reference
  31.               Object-Oriented Programming Language for DBASE(tm)
  32.                 Copyright (c) 1991 Intelligent Systems Research
  33.                               All Rights Reserved
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  63.  
  64.  
  65.                           1.0 dObject Class Library
  66.  
  67.      This section describes the class library in detail.
  68.  
  69.  
  70.      1.1 Array Class
  71.  
  72.      Message        Argument(s)         Description
  73.  
  74.      at             self, Collection    returns the object stored at
  75.                                         index(es) specified    by the
  76.                                         Collection arg.  Each element in
  77.                                         the Collection arg   must be of
  78.                                         type Int. Example: a =
  79.                                         new(Array,[3,3,3]);
  80.                                         replace(a,[0,0,0],1);   ?
  81.                                         at(a,[0,0,0]);
  82.      class          self                returns the String "Array"
  83.      dim            self                returns Collection of array
  84.                                         dimensions for self
  85.      len            self                returns the defined size of self as
  86.                                         Int
  87.      replace        self, Collection,   stores Object arg at location
  88.                     Object              within self   as specified by
  89.                                         index(es) in Collection arg.  Each
  90.                                         element   in the Collection must be
  91.                                         of type Int. Example: a =
  92.                                         new(Array,[3,3,3]);
  93.                                         replace(a,[0,0,0],1);   ?
  94.                                         at(a,[0,0,0]);
  95.  
  96.      1.2 Nil Class
  97.  
  98.      Message        Argument(s)         Description
  99.  
  100.      class                              returns the String "Nil"
  101.      clearDevice                        clears the current BGI graphics
  102.                                         screen and moves CP to (0,0)   in
  103.                                         the current viewport.  see
  104.                                         Nil::clearViewPort
  105.      clearMemory                        removes all user class definitions,
  106.                                         method definitions,   and variables
  107.                                         from memory
  108.      clearViewPort                      clears the current BGI viewport and
  109.                                         moves the CP to (0,0)   see
  110.                                         Nil::clearDevice()
  111.      closeAllDbfs                       closes all currently open Dbffile
  112.                                         objects
  113.      closeAllWindows                    closes all currently open Window
  114.                                         objects
  115.      currentDbf                         returns currently selected database
  116.                                         as Dbffile object
  117.  
  118.  
  119.                                      - 2 -
  120.  
  121.  
  122.                                                Chapter 1: dObject Class Library
  123.  
  124.  
  125.      currentNdx                         returns currently selected index
  126.                                         file as Ndxfile object
  127.      currentWindow                      returns current window as Window
  128.                                         object
  129.      date                               returns current system date
  130.      disk                               returns the current disk and
  131.                                         directory path as String
  132.      inkey                              returns input from keyboard as Int;
  133.                                         key codes are defined in   the file
  134.                                         "keydef.do"
  135.      memory                             returns amount of free memory as
  136.                                         Real
  137.      osVersion                          returns DOS version as String
  138.      readchar                           returns next Char from current
  139.                                         input device
  140.      restoreCrtMode                     restores the original CRT mode
  141.                                         detected by initGraph
  142.      setupKeyboard                      allow user to interactively define
  143.                                         keyboard setup    and key
  144.                                         assignments using menu system.
  145.                                         Allows re-definition of editor
  146.                                         function keys.     See also:
  147.                                         String::loadConfig and
  148.                                         String::saveConfig methods
  149.      setupStatus                        allow user to interactively define
  150.                                         status line text for editor,  etc.
  151.      sysPath                            returns path from where dObject was
  152.                                         started
  153.      time                               returns current time as String
  154.                                         formatted as HH:MM:SS.XX    where
  155.                                         HH = hours    MM = minutes    SS =
  156.                                         seconds    XX = hundreths of second
  157.      detectGraph                        returns a Collection of 2 Int
  158.                                         values specifying the   current
  159.                                         graphics driver and mode.
  160.      getDriverName                      returns a String containing the
  161.                                         name of the current   graphics
  162.                                         driver.
  163.      getGraphMode                       returns an Int containing the
  164.                                         current graphics mode.
  165.      getMaxMode                         returns an Int containing the
  166.                                         maximum mode number   for the
  167.                                         currently loaded driver.
  168.      graphDefaults                      sets the graphics system to default
  169.                                         values:   Viewport: mamimum device
  170.                                         resolution   Clipping: on
  171.                                         Palette: default for drive
  172.                                         Background color: 0   Drawing
  173.                                         color: max color   Fill style:
  174.                                         solid fill   Fill color: max color
  175.                                          Line style: solid line   Hardware
  176.                                         font direction: horizontal   Font
  177.  
  178.  
  179.                                      - 3 -
  180.  
  181.  
  182. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  183.  
  184.  
  185.                                         size: 1   Font justification: left
  186.                                         top   Current position: home (0,0)
  187.      closeGraph                         closes the BGI graphics system,
  188.                                         unloads the driver from   memory,
  189.                                         and restores the CRT to its
  190.                                         original state    before
  191.                                         initGraph() was called.
  192.      restoreCrtMode                     restores the CRT to its original
  193.                                         state.
  194.      getX                               returns the x co-ordinate of the CP
  195.      getY                               returns the y co-ordinate of the CP
  196.      getMaxX                            returns the max X value for the
  197.                                         current graphics driver and mode
  198.      getMaxY                            returns the max Y value for the
  199.                                         current graphics driver and mode
  200.      getLineSettings                    returns collection of 3 Int args
  201.                                         representing   current line style,
  202.                                         user-defined pattern, and thickness
  203.                                            code as described above.
  204.      getArcCoords                       returns a Collection of 6 Int
  205.                                         values containing the   x,y center
  206.                                         point, x,y start pos, and x,y end
  207.                                         pos of the arc.     This is useful
  208.                                         if you need to make a line meet at
  209.                                         the    end of an arc.
  210.      getAspectRatio                     returns Collection of 2 Int value
  211.                                         representing the   x and y aspect
  212.                                         ratio correction values of the
  213.                                         current    graphics mode.
  214.      setAspectRatio self, Int           sets the x and y aspect-ratio
  215.                                         correction factors    to self and
  216.                                         Int arg respectively.
  217.      getBkcolor     self                returns the current background
  218.                                         color
  219.      getColor                           returns the current drawing color
  220.      getMaxColor                        returns the maximum color value
  221.                                         available in the   current graphics
  222.                                         mode
  223.      getFillPattern                     returns the current user-defined
  224.                                         fill pattern as   a Collection of 8
  225.                                         Int values.
  226.      getFillSettings                    returns a Collection of 2 Int
  227.                                         values; the first is   the current
  228.                                         fill pattern; the second is the
  229.                                         current    fill color
  230.      getTextSettings                    returns Collection of 4 Int values
  231.                                         indicating   current text font,
  232.                                         direction, size, and justification
  233.      getViewSettings                    returns a Collection of 5 Int value
  234.                                         specifying   the left, top right,
  235.                                         and bottom screen co-ordinates of
  236.                                          the current viewport, and an Int
  237.  
  238.  
  239.                                      - 4 -
  240.  
  241.  
  242.                                                Chapter 1: dObject Class Library
  243.  
  244.  
  245.                                         flag indicating if    clipping is
  246.                                         on or off.
  247.      getPalette     self                returns a Collection containing the
  248.                                         current palette
  249.      getDefaultPaletteself                returns a Collection containing the
  250.                                         default palette
  251.      getPaletteSize self                returns Int size of current Palette
  252.  
  253.      1.3 Int Class
  254.  
  255.      Message        Argument(s)         Description
  256.  
  257.      abs            self                returns absolute value of self as
  258.                                         Int
  259.      asString       self                returns self as a String
  260.      asReal         self                returns self as a Real
  261.      bitnot         self                returns self with NOT of each bit
  262.                                         as Int
  263.      bitand         self, Int           returns self ANDed with argument as
  264.                                         Int
  265.      bitor          self, Int           returns self ORed with argument as
  266.                                         Int
  267.      bitxor         self, Int           returns self XORed with argument as
  268.                                         Int
  269.      bitleft        self, Int           returns self left-shifted by
  270.                                         argument as Int
  271.      bitright       self, Int           returns self right-shifted by
  272.                                         argument as Int
  273.      cday           self                returns name of nth day of week as
  274.                                         String
  275.      chr            self                returns Char with ASCII code of
  276.                                         self
  277.      class          self                returns the String "Int"
  278.      onError        self                called from dObject whenever error
  279.                                         occurs   prints error message to
  280.                                         error window for error code of self
  281.                                           you can re-define this method to
  282.                                         handle errors differently
  283.      executeKey     self                provide standard dObject key
  284.                                         handling from within form
  285.      exit           self                exits to dObject prompt with return
  286.                                         code of self
  287.      format         self, String        formats self according to format
  288.                                         spec in String arg    returns
  289.                                         String Format codes: %d  Normal
  290.                                         decimal number. (chars and
  291.                                         integers)    %u  As an unsigned
  292.                                         integer. (chars and integers)
  293.                                         %x  As a hexadecimal number. (chars
  294.                                         and integers).    %c  As a char.
  295.                                         (chars and integers).
  296.      onApplicationKeyself, Exp           evaluates Exp whenever application
  297.  
  298.  
  299.                                      - 5 -
  300.  
  301.  
  302. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  303.  
  304.  
  305.                                         key with   number of self is
  306.                                         pressed within text editor.
  307.      operator(+)    self, Int           return self plus argument
  308.      operator(-)    self, Int           returns self minus argument
  309.      operator(*)    self, Int           returns self multiplied by argument
  310.      operator(==)   self, Int           returns true if self is equal to
  311.                                         argument
  312.      operator(!=)   self, Int           returns true if self is not equal
  313.                                         to argument
  314.      operator(+)    self, Real          returns self plus argument as Real
  315.      operator(+)    self, Int           returns self plus argument as Int
  316.      operator(-)    self, Real          returns self minus argument as Real
  317.      operator(-)    self, Int           returns self minus argument as Int
  318.      operator(-)    self                returns negative of self as Int
  319.      operator(*)    self, Real          returns self multiplied by argument
  320.                                         as Real
  321.      operator(*)    self, Int           returns self multiplied by argument
  322.                                         as Int
  323.      operator(/)    self, Real          returns self divided by argument as
  324.                                         Real
  325.      operator(/)    self, Int           returns self divided by argument as
  326.                                         Int
  327.      operator(<)    self, Int           returns true if self less than
  328.                                         argument
  329.      operator(>)    self, Int           returns true if self greater than
  330.                                         argument
  331.      operator(<=)   self, Int           returns true if self less than or
  332.                                         equal to argument
  333.      operator(>=)   self, Int           returns true if self greater or
  334.                                         equal to argument
  335.      operator(<)    self, Real          returns true if self less than
  336.                                         argument
  337.      operator(>)    self, Real          returns true if self greater than
  338.                                         argument
  339.      operator(<=)   self, Real          returns true if self less than or
  340.                                         equal to argument
  341.      operator(>=)   self, Real          returns true if self greater or
  342.                                         equal to argument
  343.      say            self, Int, Char     writes Char to current window at y,
  344.                                         x of self, Int arg
  345.      max            self, Int           returns max of self and argument as
  346.                                         Int
  347.      min            self, Int           returns min of self and argument as
  348.                                         Int
  349.      random         self                returns random number as Int with
  350.                                         self as modulus
  351.      randomInit     self                initializes random number generator
  352.                                         with self as seed
  353.      setWriteMode   self                sets the writing mode for line
  354.                                         drawing   if self = 0, line color
  355.                                         will overwrite what is on screen
  356.                                         if self = 1, line color with be
  357.  
  358.  
  359.                                      - 6 -
  360.  
  361.  
  362.                                                Chapter 1: dObject Class Library
  363.  
  364.  
  365.                                         XOR'd with screen
  366.      sleep          self                sleeps for number of milliseconds
  367.                                         in self
  368.      sound          self, Int           generates sound of self ms duration
  369.                                         with    frequency = Int arg
  370.      space          self                returns blank String of length=self
  371.      textMode       self, Int           sets text mode where number of rows
  372.                                         = self   and number of columns =
  373.                                         Int arg, depending on hardware
  374.                                         normally set to 25,80 Example: on a
  375.                                         VGA, you can use textMode(50,80);
  376.      getPixel       self, Int           returns the pixel color at location
  377.                                         x,y specified   by self and Int arg
  378.      putPixel       self, Int, Int      sets the pixel at location x,y
  379.                                         (self, Int arg)   to color
  380.                                         specified by second Int arg
  381.      getImage       self, Int           returns image stored at x,y of
  382.                                         self, Int arg
  383.      imageSize      self, Int, Int, Int returns an Int number of bytes
  384.                                         necessary to store a rectangular
  385.                                         area of the screen.     Args are
  386.                                         left, top, right, and bottom
  387.                                         co-ordinates of the    region.
  388.      putImage       self, Int, Image,   writes an image to the screen at
  389.                     Int                 x,y of   self, first Int arg.
  390.                                         Second Int arg specifies how bits
  391.                                          of the image will be combined with
  392.                                         bits already on    the screen: copy
  393.                                         = 0, xor = 1, or = 2, and = 3, not
  394.                                         = 4.
  395.      setViewPort    self, Int, Int, Int,sets the current viewport   to the
  396.                     Int                 absolute screen co-ordinates left,
  397.                                         top, right,    bottom corresponding
  398.                                         to the self argument and the first
  399.                                           three Int arguments respectively.
  400.                                          The final Int arg is a    flag
  401.                                         indicating if clipping is on or off
  402.                                         (0 = off,1 = on).
  403.      setActivePage  self                sets the active graphics page to
  404.                                         page number of self.
  405.      setVisualPage  self                sets the visible graphics page to
  406.                                         page number of self.
  407.      setTextJustify self, Int           sets justification to horizontal
  408.                                         code of   self and vertical code of
  409.                                         Int arg.     Horizontal values:
  410.                                         0=left,1=center,2=right   Vertical
  411.                                         values: 0=bottom,1=top
  412.      setTextStyle   self, Int, Int      sets current text font to self;
  413.                                         sets   current direction to first
  414.                                         Int arg, and current char size
  415.                                         to second Int arg.  Text direction
  416.                                         codes are 0=horizontal    (left to
  417.  
  418.  
  419.                                      - 7 -
  420.  
  421.  
  422. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  423.  
  424.  
  425.                                         right), 1=vertical (bottom to top).
  426.      setUserCharSizeself, Int, Int, Int sets width and height ratio for
  427.                                         stroked fonts.  Sets scale factors
  428.                                         for x width, x height,    y width,
  429.                                         and y height to self and the 3 Int
  430.                                         args    respectively.
  431.      setFillStyle   self, Int           sets the current fill pattern to
  432.                                         the predefined   pattern with a
  433.                                         code of self and the current fill
  434.                                         color to    the Int arg.  Pattern
  435.                                         codes are:   0 (EMPTY_FILL) - fill
  436.                                         with background color   1
  437.                                         (SOLID_FILL) - solid fill   2
  438.                                         (LINE_FILL) - fill with ----   3
  439.                                         (LTSLASH_FILL) - fill with ///   4
  440.                                         (SLASH_FILL) - fill with ///, thick
  441.                                         lines   5 (BKSLASH_FILL) - fill
  442.                                         with backslash, thick lines   6
  443.                                         (LTBACKSLASH_FILL) - fill with
  444.                                         backslash   7 (HATCH_FILL) - light
  445.                                         hatch fill   8 (XHATCH_FILL) -
  446.                                         heavy cross hatch fill   9
  447.                                         (INTERLEAVE_FILL) - interleaving
  448.                                         line fill   10 (WIDE_DOT_FILL) -
  449.                                         widely spaced dot fill   11
  450.                                         (CLOSE_DOT_FILL) - closely spaced
  451.                                         dot fill   12 (USER_FILL) -
  452.                                         user-defined fill pattern (see
  453.                                         Collection::setFillPattern())
  454.      floodFill      self, Int, Int      fills an enclosed area on the
  455.                                         graphics   screen.  Self and the
  456.                                         first Int arg form a "seek point":
  457.                                           within the enclosed area to be
  458.                                         filled.  The are bounded by    the
  459.                                         color indicated in the second Int
  460.                                         arg is flooded with    the current
  461.                                         fill pattern and fill color.  If
  462.                                         the seed point   is within an
  463.                                         enclosed area, the the inside will
  464.                                         be filled.     If the seed is
  465.                                         outside the enclosed the area, then
  466.                                         the    exterior will be filled.
  467.      setBkColor     self                sets the current background color
  468.                                         to self
  469.      setColor       self                sets the current drawing color to
  470.                                         self
  471.      setPalette     self, Int           changes the color value stored
  472.                                         under self to   the color in the
  473.                                         Int arg
  474.      rectangle      self, Int, Int, Int draws a rectangle in the current
  475.                                         line style, thickness, and drawing
  476.                                         color.  Arguments are    left, top,
  477.  
  478.  
  479.                                      - 8 -
  480.  
  481.  
  482.                                                Chapter 1: dObject Class Library
  483.  
  484.  
  485.                                         right, and bottom co-ordinates of
  486.                                         the rectangle    to draw (from
  487.                                         (left,top) to (right,bottom)).
  488.      bar            self, Int, Int, Int draws a rectangular bar in the
  489.                                         current   line style, thickness,
  490.                                         and drawing color, and fills it
  491.                                         using the current fill pattern and
  492.                                         fill color.  Arguments    are left,
  493.                                         top, right, and bottom co-ordinates
  494.                                         of the    rectangle to draw (from
  495.                                         (left,top) to (right,bottom)).
  496.      bar3d          self, Int, Int, Int,draws a rectangular 3-D bar in
  497.                     Int, Int            the current line style, thickness,
  498.                                         and drawing color,    and fills it
  499.                                         using the current fill pattern and
  500.                                         fill color.     Arguments are left,
  501.                                         top, right, and bottom co-ordinates
  502.                                         of    the rectangle to draw (from
  503.                                         (left,top) to (right,bottom)),
  504.                                         the depth of the bar, and a flag
  505.                                         indicating if a top   to the bar
  506.                                         should be drawn (0=no, 1=yes).
  507.      ellipse        self, Int, Int, Int,draws an ellipse in the current
  508.                     Int, Int)           drawing color.  Args are center
  509.                                         point X,Y, start angle,    end
  510.                                         angle, and X and Y radius.
  511.      fillEllipse    self, Int, Int, Int)draws an ellipse and fills it with
  512.                                          the current fill pattern in the
  513.                                         current fill color.     Args are X,
  514.                                         Y, X radius, and Y radius.
  515.      pieSlice       self, Int, Int, Int,draws and fills a pie slice using
  516.                     Int                 current fill pattern and drawing
  517.                                         color.  Arguments are    X,Y
  518.                                         center, start angle, end angle, and
  519.                                         radius.
  520.      pieSliceXY     self, Int, Int, Int,draws and fills an   elliptical pie
  521.                     Int, Int            slice using current fill pattern
  522.                                         and drawing    color.  Arguments
  523.                                         are X,Y center, start angle, end
  524.                                         angle,    X radius, and Y radius.
  525.      setAspectRatio self, Int           sets the x and y aspect-ratio
  526.                                         correction factors    to self and
  527.                                         Int arg respectively.
  528.      arc            self, Int, Int, Int,draws a circular arc in the current
  529.                     Int                    drawing color.  Arguments are
  530.                                         X,Y center, start angle,    end
  531.                                         angle, and radius.
  532.      circle         self, Int, Int      draws a circle in the current
  533.                                         drawing color.   Arguments are X,Y
  534.                                         of center, and radius.
  535.      setLineStyle   self, Int, Int      sets the current line style to the
  536.                                          code in self; sets the current
  537.  
  538.  
  539.                                      - 9 -
  540.  
  541.  
  542. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  543.  
  544.  
  545.                                         pattern to the first Int    arg
  546.                                         code, and the current thickness to
  547.                                         the second Int arg.     Line style
  548.                                         codes are 0=solid,1=dotted,
  549.                                         2=center, 3=dashes,
  550.                                         4=user-defined.  You can define a
  551.                                         line style by using a    16-bit
  552.                                         pattern in the first Int arg, where
  553.                                         whenver a bit   in the pattern is
  554.                                         set to one, the corresponding pixel
  555.                                         in    the line is drawn in the
  556.                                         current drawing color.  For
  557.                                         example, a solid line is
  558.                                         represented by the value $FFFF
  559.                                         (all one's), and a dashed line is
  560.                                         $3333 or $0F0F.     Thickness codes
  561.                                         in the second Int arg are 0=1 pixel
  562.                                            wide, 3=3 pixels wide.
  563.      line           self, Int, Int, Int draws a line in the current drawing
  564.                                         color.   Arguments are X,Y of start
  565.                                         point and X,Y of end point.
  566.      linerel        self, Int           draws a line in the current drawing
  567.                                         color from   current position to
  568.                                         relative offset of self, Int arg.
  569.      lineto         self, Int           draws a line in the current drawing
  570.                                         color from   current position to
  571.                                         X,Y position of self, Int arg.
  572.      moveTo         self, Int           moves the CP to X,Y of self, Int
  573.                                         arg
  574.      moveRel        self, Int           moves the CP the X,Y relative
  575.                                         distance
  576.      getModeName    self                returns a String containing the
  577.                                         graphics mode   name for the mode
  578.                                         with Int code of self.
  579.      getModeRange   self                returns a Collection of 2 Int
  580.                                         values specifying   the min and max
  581.                                         mode values for the graphics driver
  582.                                            with Int code of self.
  583.      setGraphMode   self                changes the graphics mode to self.
  584.      outTextXY      self, Int, String   outputs String arg to x,y location
  585.                                           of self, Int arg in current font,
  586.                                         style, and size
  587.  
  588.      1.4 Long Class
  589.  
  590.      Message        Argument(s)         Description
  591.  
  592.      asAddress      self                returns self converted to Address
  593.      asInt          self                returns self converted to Int
  594.      asReal         self                returns self converted to Real
  595.      class          self                returns the String "Long"
  596.      operator(+)    self, Long          returns self plus argument as Long
  597.  
  598.  
  599.                                      - 10 -
  600.  
  601.  
  602.                                                Chapter 1: dObject Class Library
  603.  
  604.  
  605.      operator(-)    self, Long          returns self minus argument as Long
  606.      operator(-)    self                returns negative of self as Long
  607.      operator(*)    self, Long          returns self multiplied by argument
  608.                                         as Long
  609.      operator(/)    self, Long          returns self divided by argument as
  610.                                         Long
  611.  
  612.      1.5 Real Class
  613.  
  614.      Message        Argument(s)         Description
  615.  
  616.      abs            self                returns absolute value of self as
  617.                                         Real
  618.      asInt          self                returns self converted to Int
  619.      asDate         self                returns Date having julian number
  620.                                         of self
  621.      asLong         self                returns self converted to Long
  622.      asString       self                returns self as a String
  623.      class          self                returns the String "Real"
  624.      cos            self                returns cosine of self as Real;
  625.                                         self in radians
  626.      format         self, String        formats self into String using
  627.                                         format    contained in String arg
  628.                                         Format codes: %g  Reals in shortest
  629.                                         posible format (default for reals)
  630.                                           %e  Reals in exponetial notation
  631.                                           %f  Reals in fixed notation
  632.      max            self, Real          returns max of self and argument as
  633.                                         Real
  634.      min            self, Real          returns min of self and argument as
  635.                                         Real
  636.      operator(+)    self, Real          returns self plus argument as Real
  637.      operator(+)    self, Int           returns self plus argument as Real
  638.      operator(-)    self, Real          returns self minus argument as Real
  639.      operator(-)    self, Int           returns self minus argument as Real
  640.      operator(-)    self                returns negative of self as Real
  641.      operator(*)    self, Real          returns self multiplied by argument
  642.                                         as Real
  643.      operator(*)    self, Int           returns self multiplied by argument
  644.                                         as Real
  645.      operator(/)    self, Real          returns self divided by argument as
  646.                                         Real
  647.      operator(/)    self, Int           returns self divided by argument as
  648.                                         Real
  649.      operator(<)    self, Real          returns true if self less than
  650.                                         argument
  651.      operator(>)    self, Real          returns true if self greater than
  652.                                         argument
  653.      operator(<=)   self, Real          returns true if self less than or
  654.                                         equal to argument
  655.      operator(>=)   self, Real          returns true if self greater than
  656.                                         or equal to argument
  657.  
  658.  
  659.                                      - 11 -
  660.  
  661.  
  662. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  663.  
  664.  
  665.      operator(          returns self raised to power in    self, Real
  666.                                         Real arg
  667.      operator(==)   self, Real          returns true if self is equal to
  668.                                         argument
  669.      operator(!=)   self, Real          returns true if self is not equal
  670.                                         to argument
  671.      sin            self                returns sine of self as Real;  self
  672.                                         in radians
  673.      sqrt           self                returns square root of self as Real
  674.      tan            self                returns tangent of self as Real;
  675.                                         self in radians
  676.      trunc          self                returns self truncated after
  677.                                         decimal point
  678.  
  679.      1.6 String Class
  680.  
  681.      Message        Argument(s)         Description
  682.  
  683.      operator(==)   self, String        returns true if self is equal to
  684.                                         argument
  685.      operator(!=)   self, String        returns true if self is not equal
  686.                                         to argument
  687.      operator(<)    self, String        returns true if self less than
  688.                                         argument
  689.      operator(>)    self, String        returns true if self greater than
  690.                                         argument
  691.      operator(<=)   self, String        returns true if self less than or
  692.                                         equal to argument
  693.      operator(>=)   self, String        returns true if self greater than
  694.                                         or equal to argument
  695.      operator(+)    self, String        returns self concatenated with
  696.                                         argument
  697.      operator($)    self, String        returns true if argument is
  698.                                         substring of self
  699.      accept         self                prints self as prompt to current
  700.                                         window   returns String read as
  701.                                         input from keyboard
  702.      asDate         self, String        returns Date resulting from
  703.                                         conversion of self    under format
  704.                                         specified by String arg
  705.      asExp          self                returns Exp parsed from text in
  706.                                         self
  707.      asId           self                returns self as an Exp of type ID
  708.                                         (like #a);
  709.      asInt          self                returns self as an Int
  710.      asLogical      self                returns self as Logical (self must
  711.                                         be "T" or "F")
  712.      asLong         self                returns self as Long
  713.      asLower        self                returns self with all lowercase
  714.                                         char
  715.      asUpper        self                returns self with all uppercase
  716.                                         char
  717.  
  718.  
  719.                                      - 12 -
  720.  
  721.  
  722.                                                Chapter 1: dObject Class Library
  723.  
  724.  
  725.      at             self, Int           returns character at position
  726.                                         indicated by argument
  727.      createDbf      self, Collection    returns Dbffile of new DBASE file
  728.                                         created with name of self    and
  729.                                         fields defined in Collection arg
  730.      class          self                returns the String "String"
  731.      cursorstate    self                sets cursor to on/off state
  732.                                         specified in self ("on" or "off")
  733.      deleteFile     self                deletes the DOS file with name
  734.                                         specified by self
  735.      dir            self, String        returns filename selected from
  736.                                         directory menu as String with
  737.                                         directory path in "self" and file
  738.                                         pattern in argument
  739.      disk           self                sets the current disk and directory
  740.                                         to path in self
  741.      display        self                displays self in current window
  742.      do             self                executes statements in file with
  743.                                         filename of self
  744.      envSymbol      self                returns value of DOS symbol
  745.                                         specified by self
  746.      edit           self                calls editor on self in current
  747.                                         window
  748.      editFile       self                calls editor on contents of file
  749.                                         with filename of self
  750.      errorMessage   self, Int           returns String error message from
  751.                                         error file    in filename specified
  752.                                         in self   Int arg = error number to
  753.                                         find message for
  754.      existFile      self                returns logical T if file with name
  755.                                         of self exists   else returns
  756.                                         logical F
  757.      fileString     self                returns contents of file with
  758.                                         filename of self as String
  759.      format         self, String        returns String arg formatted using
  760.                                         format spec in self Format codes:
  761.                                         %s  Strings.
  762.      help           self                displays hypertext help for
  763.                                         topic=self
  764.      installUserDriverself                installs third-party BGI driver
  765.                                         with filename of self   returns Int
  766.                                         driver number of installed driver
  767.      installUserFontself                installs thirt-party BGI font with
  768.                                         filename of self   returns Int font
  769.                                         number of installed font
  770.      len            self                returns length of self as Int
  771.      loadConfig     self                load keyboard config from .CFG file
  772.                                         with filename of self
  773.      match          self, String        returns String that matches self
  774.                                         against GREP pattern    in String
  775.                                         arg. Special characters:   '
  776.                                         start-of-line anchor   '$'
  777.  
  778.  
  779.                                      - 13 -
  780.  
  781.  
  782. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  783.  
  784.  
  785.                                         end-of-line anchor   '.' matches
  786.                                         any character   '[' start a
  787.                                         character class   ']' end a
  788.                                         character class   ' negates
  789.                                         character class if 1st char   '*'
  790.                                         Keene closure (matches 0 or more)
  791.                                         '+' positive closure (1 or more)
  792.                                         '?' optional closure (0 or more)
  793.      mkdir          self                creates DOS directory with path
  794.                                         specified in self
  795.      replace        self, Char, Char    replaces every instance of first
  796.                                         char within self   with second
  797.                                         char.  Replaces string in-place
  798.                                         (does not    simply return a copy
  799.                                         of self)
  800.      reverse        self                returns self with characters in
  801.                                         reverse order
  802.      saveConfig     self                save current keyboard config in
  803.                                         .CFG file with filename of self
  804.      set            self                returns the value of the SET
  805.                                         variable named by self
  806.      set            self, Value         sets the SET variable named by self
  807.                                         to Value Example: set("echo", T);
  808.      split          self                returns Collection of 3 Strings
  809.                                         containing split of self    into
  810.                                         path, filename, and file extension
  811.      system         self, Int           executes DOS command in self   Int
  812.                                         arg=0 do not reset video   Int
  813.                                         arg=1 reset video to state it was
  814.                                         in before DOS cmd   returns the Int
  815.                                         DOS error code returned by the
  816.                                         command
  817.      token          self                returns a Collection of 2 Strings
  818.                                         first String is the next token
  819.                                         within self   second String is
  820.                                         resulting string (self without
  821.                                         first token)  Example: token("1 2
  822.                                         3");    returns ["1","2 3 "]
  823.      trim           self                returns self with trailing blanks
  824.                                         trimmed
  825.      wrap           self, Int, Char     returns self word wrapped   Int arg
  826.                                         = max column width to word wrap for
  827.                                           Char arg = char to embed at word
  828.                                         wrap points
  829.      outText        self                outputs a string to the current
  830.                                         graphics position (CP).
  831.      textHeight     self                returns height of self in pixels as
  832.                                         Int
  833.      textWidth      self                returns width of self in pixels as
  834.                                         Int
  835.  
  836.  
  837.  
  838.  
  839.                                      - 14 -
  840.  
  841.  
  842.                                                Chapter 1: dObject Class Library
  843.  
  844.  
  845.      1.7 Char Class
  846.  
  847.      Message        Argument(s)         Description
  848.  
  849.      asc            self                returns Int numeric value of self
  850.      asLower        self                returns self converted to lower
  851.                                         case
  852.      asUpper        self                returns self converted to upper
  853.                                         case
  854.      class          self                returns the string "Char"
  855.      diskspace      self                returns Real number of bytes on
  856.                                         disk with drive letter of self
  857.      unread         self                pushes self back into keyboard
  858.                                         buffer
  859.  
  860.      1.8 Logical Class
  861.  
  862.      Message        Argument(s)         Description
  863.  
  864.      class          self                returns the string "Logical"
  865.      operator(&)    self, Logical       returns true if self and arg are
  866.                                         true
  867.      operator(|)    self, Logical       returns true if self or arg is true
  868.      operator(!)    self                returns logical NOT of self
  869.  
  870.      1.9 Date Class
  871.  
  872.      Message        Argument(s)         Description
  873.  
  874.      asString       self, String        returns String of self formatted as
  875.                                         specified in String arg Codes:  CC
  876.                                         2-digit century,  YY 2-digit year,
  877.                                         MM 2-digit month   MMM 3-char
  878.                                         month, DD 2-digit day Examples:
  879.                                         YY.MM.DD, CCYY.MM.DD, MM/DD/YY,
  880.                                         DD-MM/YY,    DD-MM/CCYY, MMM DD/YY
  881.      asJulian       self                returns julian number of self as
  882.                                         Real
  883.      class          self                returns the String "Date"
  884.      cmonth         self                returns name of month of self as
  885.                                         String
  886.      day            self                returns day of self as Int
  887.      dow            self                returns number of day of week of
  888.                                         self as Int
  889.      month          self                returns month of self as Int
  890.      operator(+)    self, Int           returns date of self plus number of
  891.                                         days in argument
  892.      operator(-)    self, Int           returns date of self minus number
  893.                                         of days in argument
  894.      operator(==)   self, Date          returns true if self is equal to
  895.                                         argument
  896.      operator(!=)   self, Date          returns true if self is not equal
  897.  
  898.  
  899.                                      - 15 -
  900.  
  901.  
  902. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  903.  
  904.  
  905.                                         to argument
  906.      operator(<)    self, Date          returns true if self less than
  907.                                         argument
  908.      operator(>)    self, Date          returns true if self greater than
  909.                                         argument
  910.      operator(<=)   self, Date          returns true if self less than or
  911.                                         equal to argument
  912.      operator(>=)   self, Date          returns true if self greater or
  913.                                         equal to argument
  914.      setDay         self, Int           returns self with day = argument
  915.      setMonth       self, Int           returns self with month = argument
  916.      setYear        self, Int           returns self with year = argument
  917.      year           self                returns year of self as Int
  918.  
  919.      1.10 Collection Class
  920.  
  921.      Message        Argument(s)         Description
  922.  
  923.      append         self, Object        appends Object arg to end of self
  924.      at             self, Int           returns object at position
  925.                                         specified by Int arg
  926.      avg            self                returns average of all elements in
  927.                                         self
  928.      class          self                returns the string "Collection"
  929.      head           self                returns first element of self
  930.      insert         self, Object        inserts Object arg at front of self
  931.      intersect      self, Collection    returns intersection of self and
  932.                                         Collection arg
  933.      len            self                returns the number of elements in
  934.                                         self as Int
  935.      max            self                returns maximum element in self
  936.      min            self                returns minimum element in self
  937.      operator(+)    self, Object        returns self with Object arg
  938.                                         appended
  939.      operator($)    self, Object        returns Logical .T. if Object arg
  940.                                         is in self
  941.      remove         self, Object        returns self with every occurrence
  942.                                         of Object arg deleted
  943.      replace        self, Object, Objectreturns self with every occurrence
  944.                                         of   first Object arg replaced by
  945.                                         second Object arg
  946.      reverse        self                returns self in reverse order
  947.      sort           self                returns self with elements in
  948.                                         ascending order
  949.      subset         self, Collection    returns Logical .T. if Collection
  950.                                         arg    is a subset of self; else
  951.                                         returns logical .F.
  952.      sum            self                returns all elements in self added
  953.      tail           self                returns self without first element
  954.      union          self, Collection    returns union of self and
  955.                                         Collection arg
  956.      unique         self                returns Collection with distinct
  957.  
  958.  
  959.                                      - 16 -
  960.  
  961.  
  962.                                                Chapter 1: dObject Class Library
  963.  
  964.  
  965.                                         elements in self only
  966.      drawPoly       self                draws a polygon with as many points
  967.                                         as   Int value pairs in the
  968.                                         collection; each Int pair is an
  969.                                         x,y co-ordinate of a vertex on the
  970.                                         polygon.
  971.      fillPoly       self                draws a polygon with as many points
  972.                                         as   Int value pairs in the
  973.                                         collection and fills it using
  974.                                         the current fill style and fill
  975.                                         color; each Int pair is    an x,y
  976.                                         co-ordinate of a vertex on the
  977.                                         polygon.
  978.      setAllPalette  self                sets list of new palette colors.
  979.                                         self    must be a Collection of 8
  980.                                         Int values specifying the colors.
  981.      setFillPattern self, Int           sets the current fill pattern to a
  982.                                          user-defined Collection of 8 Int
  983.                                         color values. Each Int    value
  984.                                         represents a byte of 8 pixels;
  985.                                         whenever a bit in    the pixel
  986.                                         pattern is set to 1, the
  987.                                         corresponding pixel will    be
  988.                                         plotted.  The Int arg is the fill
  989.                                         color to use.
  990.  
  991.      1.11 Menu Class
  992.  
  993.      Message        Argument(s)         Description
  994.  
  995.      choice         self, Int           returns index of choice picked when
  996.                                         menu is executed   menu bar is
  997.                                         positioned at choice number
  998.                                         indicated by Int arg   menu is left
  999.                                         displayed in current window   (see
  1000.                                         Menu::remove())
  1001.      class          self                returns the String "Menu"
  1002.      remove         self                removes self from screen
  1003.      window         self                returns the Window associated with
  1004.                                         self
  1005.  
  1006.      1.12 Linemenu Class
  1007.  
  1008.      Message        Argument(s)         Description
  1009.  
  1010.      choice         self                returns index of choice picked when
  1011.                                         menu is executed   menu is left
  1012.                                         displayed in current window    (see
  1013.                                         Linemenu::remove())
  1014.      class          self                returns the String "Linemenu"
  1015.      remove         self                removes self from screen
  1016.  
  1017.  
  1018.  
  1019.                                      - 17 -
  1020.  
  1021.  
  1022. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  1023.  
  1024.  
  1025.      1.13 Window Class
  1026.  
  1027.      Message        Argument(s)         Description
  1028.  
  1029.      class          self                returns the string "Window"
  1030.      clear          self                clears text in self
  1031.      clearGets      self                removes all SAY and GET fields
  1032.                                         within self
  1033.      clearKeys      self                removes all onKey definitions for
  1034.                                         self
  1035.      contents       self                returns String containing current
  1036.                                         Window contents
  1037.      currentField   self                returns Field object that is
  1038.                                         current    for full screen input
  1039.                                         mode
  1040.      draw           self                draws all SAY and GET fields within
  1041.                                         self but does not read them
  1042.      firstField     self                returns first GET Field defined for
  1043.                                         self.    See Window::read,
  1044.                                         Window::nextField,
  1045.                                         Window::prevField.
  1046.      gotoField      self, Field         positions cursor at beginning of
  1047.                                         field and    enters full screen
  1048.                                         input mode.  See Window::read.
  1049.      nextField      self                returns Field immediately after
  1050.                                         current input Field.   see
  1051.                                         Window::read, Window::firstField,
  1052.                                         Window::prevField.
  1053.      onKey          self, Int, Exp      called from Window::read() method
  1054.                                         whenever a key   is pressed from
  1055.                                         within the form; default is to call
  1056.                                            Int::executeKey() but can be
  1057.                                         re-defined to allow application
  1058.                                         to trap certain keys   Int arg =
  1059.                                         key to trap   Exp arg = expression
  1060.                                         to evaluate when key equal to Int
  1061.                                         arg is pressed
  1062.      prevField      self                returns Field immediately prior to
  1063.                                         current input Field.   see
  1064.                                         Window::read, Window::firstField,
  1065.                                         Window::nextField.
  1066.      read           self                draws all SAY and GET fields.
  1067.                                         Positions cursor at first GET field
  1068.                                         and enters full screen    input
  1069.                                         mode.  The following keys are
  1070.                                         active:   Esc - exits the form and
  1071.                                         returns to dObject> prompt   Home -
  1072.                                         Positions the current DBF file at
  1073.                                         the first record and displays it
  1074.                                         End - Positions the current DBF
  1075.                                         file at the last record and
  1076.                                         displays it   PgUp - Positions the
  1077.  
  1078.  
  1079.                                      - 18 -
  1080.  
  1081.  
  1082.                                                Chapter 1: dObject Class Library
  1083.  
  1084.  
  1085.                                         current DBF file at the previous
  1086.                                         record and displays it   PgDn -
  1087.                                         Positions the current DBF file at
  1088.                                         the next record and displays it
  1089.                                         Tab - Positions the cursor at the
  1090.                                         beginning of the next display field
  1091.                                           Up - Positions the cursor up one
  1092.                                         line   Down - Positions the cursor
  1093.                                         down one line   Right - Positions
  1094.                                         the cursor right one space within
  1095.                                         current display field   Left -
  1096.                                         Positions the cursor left one space
  1097.                                         within the current display field
  1098.                                         F10 - exits the form and returns to
  1099.                                         dObject> prompt
  1100.      remove         self                removes self from the screen
  1101.      resize         self                allows user to interactively resize
  1102.                                         self using arrow keys
  1103.      resize         self, Int, Int, Int,change size of self to y, x, ylen,
  1104.                     Int                 xlen Int args
  1105.      say            self, Int, Int,     displays Value argument within self
  1106.                     Value, Int, Int       Int arg #1 = y coordinate of
  1107.                                         field   Int arg #2 = x coordinate
  1108.                                         of field   Value arg = value to
  1109.                                         disp   Int arg#3 = length of field
  1110.                                          Int arg#4 = color attribute of
  1111.                                         field
  1112.      sayExp         self, Int, Int, Exp,displays Exp argument within self
  1113.                     Int, Int            but waits until "read" is issued
  1114.                                         before evaluating Exp   Int arg #1
  1115.                                         = y coordinate of field   Int arg
  1116.                                         #2 = x coordinate of field   Value
  1117.                                         arg = value to disp   Int arg#3 =
  1118.                                         length of field   Int arg#4 = color
  1119.                                         attribute of field
  1120.      scroll         self, Int, Int      scrolls self in Y,X direction of
  1121.                                         Int args
  1122.      select         self                makes self the current Window.  see
  1123.                                         Nil::currentWindow.
  1124.      setupColor     self, Int           interactively change window color
  1125.                                         based on menu choice   Int arg=0
  1126.                                         setup window color   Int arg=1
  1127.                                         setup frame color
  1128.      setFrame       self, Int, String,  sets frame characteristics   Int
  1129.                     Int, String         arg #1 = frame color (attribute)
  1130.                                         String arg #1 = window title   Int
  1131.                                         arg #1 = position of start of title
  1132.                                         (255 = center)   String arg #2 =
  1133.                                         characters in frame string
  1134.      setTitle       self, String        returns self with title = argument
  1135.      setPosition    self, Int, Int, Int,returns self with position = Int
  1136.                     Int                 arguments (x, y, length, height)
  1137.  
  1138.  
  1139.                                      - 19 -
  1140.  
  1141.  
  1142. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  1143.  
  1144.  
  1145.      title          self                returns String containing title of
  1146.                                         self
  1147.  
  1148.      1.14 Dbffile Class
  1149.  
  1150.      Message        Argument(s)         Description
  1151.  
  1152.      asCollection   self                returns array of values of argument
  1153.                                         expression evaluated for each
  1154.                                         record in self that is true for the
  1155.                                         current filter expression
  1156.      avg            self, Exp           returns average value of Exp
  1157.                                         evaluated across all records
  1158.      blank          self                fills the current record buffer for
  1159.                                         self with blanks
  1160.      class          self                returns the String "Dbffile"
  1161.      close          self                closes the .DBF file for self;
  1162.                                         returns nil
  1163.      bot            self                positions current record at bottom
  1164.                                         of file using current index file.
  1165.                                          If no index is open,  go to
  1166.                                         physical last record in self
  1167.                                         Returns 0 if OK,  3 if EOF,  -1 if
  1168.                                         Error
  1169.      clearIndexes   self                closes all open index files
  1170.                                         associated with self   returns Int
  1171.                                         0 if OK,  -1 if error
  1172.      clearRelation  self                Removes all relationships for self
  1173.                                           (see Dbffile::setRelation())
  1174.                                         returns Int 0 if OK,  -1 if error
  1175.      createIndex    self, String,       creates a new DBASE index file on
  1176.                     String, Int, Int    self   String arg1 = name of index
  1177.                                         to create   String arg2 = text for
  1178.                                         expression to evaluate for index
  1179.                                         Int arg1 = unique flag  1=unique
  1180.                                         0=not unique   Int arg2 = safety
  1181.                                         flag    1=do not remove existing
  1182.                                         file with this name    0=remove any
  1183.                                         existing file with this name
  1184.                                         returns Int  reference number of
  1185.                                         index created if OK,  -1 if error
  1186.      date           self                returns creation date of self
  1187.      decimals       self, String        returns Int number of decimals in
  1188.                                         field named in String arg
  1189.      delete         self, Long          deletes record number = Long arg
  1190.                                         within self
  1191.      eof            self                returns Logical .T. if current
  1192.                                         record is at end of file;   else
  1193.                                         returns Logical .F.
  1194.      fieldString    self                returns the internal buffer for
  1195.                                         field name = String arg   as String
  1196.                                         at current record of self; can be
  1197.  
  1198.  
  1199.                                      - 20 -
  1200.  
  1201.  
  1202.                                                Chapter 1: dObject Class Library
  1203.  
  1204.  
  1205.                                         used to determine    if named field
  1206.                                         is blank or empty
  1207.      go             self, Long          returns self with current record at
  1208.                                         record number    specified by arg
  1209.      htExpand       self, Ndxfile, Int, expands text into hypertext    self
  1210.                     Int, String         arg = DBASE file containing topic
  1211.                                         and text fields to use as hypertext
  1212.                                         dictionary   Ndxfile arg = DBASE
  1213.                                         index on topic field   Int arg#1 =
  1214.                                         color to highlight topics with in
  1215.                                         expanded text   Int arg#2 = length
  1216.                                         of topic field   String arg#1 =
  1217.                                         normal text to be expanded into
  1218.                                         hypertext   Returns String
  1219.                                         containing hypertext
  1220.      insert         self, Long          The record in the record buffer
  1221.                                         becomes the record number
  1222.                                         indicated by the Long arg.  All of
  1223.                                         the former records starting at
  1224.                                         this position are copied forward
  1225.                                         one record to insert the new
  1226.                                         record.  All of the open index
  1227.                                         files for self are then reindexed
  1228.                                         to   maintain their correct record
  1229.                                         numbers.     Returns 0 if OK,  -1
  1230.                                         if error.
  1231.      locate         self, String, Value locates record with field of name
  1232.                                         in String arg    and value of Value
  1233.                                         arg through sequential search
  1234.                                         starting at current record
  1235.      lock           self, Int, Int      attempts to lock self; returns 0 if
  1236.                                         successful   if argument#1 is 0,
  1237.                                         locks record   if argument#1 is 1,
  1238.                                         locks entire file   if argument#2
  1239.                                         is 0,  waits until lock succeeds
  1240.                                         if argument#s is 1,  does not wait
  1241.      max            self, Exp           returns maximum value of Exp
  1242.                                         evaluated for all records in file
  1243.      min            self, Exp           returns minimum value of Exp
  1244.                                         evaluated for all records in file
  1245.      name           self                returns filename of self
  1246.      numFields      self                returns Int number of fields in
  1247.                                         self
  1248.      numRecords     self                returns Long number of records in
  1249.                                         self
  1250.      pack           self, Long, Long    deletes records in self    from
  1251.                                         recno=first arg to recno=second arg
  1252.      recall         self, Long          recalls record number = Long arg
  1253.                                         from being deleted
  1254.      recno          self                returns Long current record number
  1255.                                         of self
  1256.      seek           self, Object        goes to record number in self that
  1257.  
  1258.  
  1259.                                      - 21 -
  1260.  
  1261.  
  1262. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  1263.  
  1264.  
  1265.                                         matches Object arg   by doing a
  1266.                                         binary search of currently selected
  1267.                                         .NDX file   returns Int values:   0
  1268.                                         exact match with key was found   1
  1269.                                         partial match   2 key not found;
  1270.                                         position is on record after where
  1271.                                         key should be in Dbffile   3 end of
  1272.                                         file   -1 error
  1273.      select         self                selects self as current database
  1274.                                         returns Int ref number of self
  1275.      setFilter      self, Exp           returns self with filter set to
  1276.                                         argument   Future operations on
  1277.                                         self will only process records that
  1278.                                            cause Exp to evaluate to Logical
  1279.                                         .T. Example: d =
  1280.                                         new(Dbffile,"test");
  1281.                                         setFilter(d,#recno(d) > 5);
  1282.      setRelation    self, String, Int,  Creates a relationship between a
  1283.                     Int, Int            controlling    database and self.
  1284.                                         When self is repositioned,  the
  1285.                                         expression in the String arg is
  1286.                                         looked up in the index file    to
  1287.                                         move to a record in the related
  1288.                                         database.  If no index    file is
  1289.                                         specified the expression should
  1290.                                         return a Long value    that is used
  1291.                                         as the record number to go to in
  1292.                                         the related    database.   String
  1293.                                         arg = text for expression to
  1294.                                         evaluate as described above   Int
  1295.                                         arg1 = database reference number
  1296.                                         for related database   Int arg2 =
  1297.                                         index reference number of index to
  1298.                                         use (-1 if no index)   Int arg3 =
  1299.                                         Missing code; specifies action to
  1300.                                         take if record not found in related
  1301.                                         database    =0 use blank record
  1302.                                         =1 generate error message    >=1
  1303.                                         default record number   Returns Int
  1304.                                         0 if OK,  -1 if error
  1305.      skip           self, Long          increments current record position
  1306.                                         by argument
  1307.      structure      self                returns Collection of field
  1308.                                         definitions for self    (see
  1309.                                         Dbffile::create())
  1310.      sum            self, Exp           returns sum of Exp evaluated for
  1311.                                         all records in file
  1312.      top            self                positions current record in self at
  1313.                                         top of file using current index
  1314.                                         If no index is open,  go to
  1315.                                         physical first record in self
  1316.                                         returns 0 if OK,  -1 if error
  1317.  
  1318.  
  1319.                                      - 22 -
  1320.  
  1321.  
  1322.                                                Chapter 1: dObject Class Library
  1323.  
  1324.  
  1325.      unlock         self, Int           attempts to unlock self   If Int
  1326.                                         argument is 0 unlocks record; else
  1327.                                         unlocks file   returns Int 0 if OK,
  1328.                                          -1 if error
  1329.      width          self, String        returns width of field specified by
  1330.                                         argument as Int
  1331.      write          self, Long          write the contents of the current
  1332.                                         record to file    at record number
  1333.                                         indicated by Long arg.    If Long
  1334.                                         arg = 0,  append new record at end
  1335.                                         of file.    Returns 0 if OK,  -1 if
  1336.                                         error
  1337.      zap            self, Long, Long    delete records in file from record
  1338.                                         number specified in first Long arg
  1339.                                         up to record number specified by
  1340.                                         second Long arg   Returns 0 if OK,
  1341.                                         -1 if error
  1342.  
  1343.      1.15 Ndxfile Class
  1344.  
  1345.      Message        Argument(s)         Description
  1346.  
  1347.      bot            self                positions current record of self at
  1348.                                         bottom
  1349.      class          self                returns the String "Ndxfile"
  1350.      close          self                closes the .NDX file for self
  1351.      lock           self, Int           locks self   Int arg = wait flag
  1352.                                         =0 do not wait if file is locked by
  1353.                                         another user   =1 keep trying (once
  1354.                                         per second) if file is locked
  1355.                                         returns 0 if OK,  -1 if error,  -2
  1356.                                         if file is locked by     another
  1357.                                         user and wait=0 was specified
  1358.      reindex        self                reindexes self   returns 0 if OK,
  1359.                                         -1 if error
  1360.      select         self                selects self as current index file
  1361.                                          returns Int ref number of self
  1362.      skip           self, Long          skips the number of records in self
  1363.                                         indicate by Long arg   returns 0 if
  1364.                                         OK,  -1 if error
  1365.      top            self                positions current record of self at
  1366.                                         top of file   returns 0 if OK,  -1
  1367.                                         if error
  1368.      type           self                returns Char type of self using
  1369.                                         DBASE conventions for type   C=char
  1370.                                         , D=date,  N=numeric,  M=memo
  1371.      unlock         self                unlocks self; returns Int 0 if OK,
  1372.                                         -1 if error
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.                                      - 23 -
  1380.  
  1381.  
  1382. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  1383.  
  1384.  
  1385.      1.16 File Class
  1386.  
  1387.      Message        Argument(s)         Description
  1388.  
  1389.      class          self                returns the String "File"
  1390.      close          self                closes self; returns nil
  1391.      flush          self                flushes self; returns nil
  1392.      readDevice     self                sets current input device to self
  1393.      seek           self, Int, Int      sets byte position within self
  1394.                                         using offset in first Int arg
  1395.                                         second Int arg = offset position
  1396.                                         flag    =0 offset from beginning of
  1397.                                         file    =1 offset from current
  1398.                                         position    =2 offset from end of
  1399.                                         file
  1400.      writeDevice    self                sets current output device to self
  1401.  
  1402.      1.17 Exp Class
  1403.  
  1404.      Message        Argument(s)         Description
  1405.  
  1406.      class          self                returns the String "Exp"
  1407.      eval           self                evaluates self and returns value
  1408.      inherit        self, Exp,          creates new class with parent class
  1409.                     Collection          specified in self    Exp arg = ID
  1410.                                         name of new class   Collection arg
  1411.                                         = collection of String(s)
  1412.                                         specifying names of   class
  1413.                                         variables in the new class Example:
  1414.                                         inherit(Int, Newint, ["i"]);
  1415.      friend         self, Exp           defines class in Exp arg as a
  1416.                                         friend of class in self   (both
  1417.                                         arguments must be of type ID)
  1418.                                         allows class in Exp arg access to
  1419.                                         variables and private    methods
  1420.                                         for class in self
  1421.      name           self                returns String that is name of Exp
  1422.                                         if Exp is of type ID
  1423.      new            self...             returns a new object of type
  1424.                                         specified by self (self=ID).
  1425.                                         Arguments depend on class type.
  1426.                                         Example: i = new(Int, 1);   r =
  1427.                                         new(Real, 1.1);   l = new(Logical,
  1428.                                         T);   w = new(Window, 1, 31, 3, "
  1429.                                         title ", 0, 0, 24, 80);   db =
  1430.                                         new(Dbffile, "help");   ndx =
  1431.                                         new(Ndxfile, db, "help");   arr =
  1432.                                         new(Array,[3,3,3]);   coll =
  1433.                                         new(Collection);   file =
  1434.                                         new(File,"prn:",1,0,0);   m =
  1435.                                         new(Linemenu,1,5,54,54,[1,2,3,4,5,6],
  1436.  
  1437.  
  1438.  
  1439.                                      - 24 -
  1440.  
  1441.  
  1442.                                                Chapter 1: dObject Class Library
  1443.  
  1444.  
  1445.                                         ["first","second","third","fourth","fifth","sixth"]);
  1446.  
  1447.      release        self                release variable named by self.
  1448.                                         Example:  release(#a);
  1449.      releaseClass   self                releases all class definitions,
  1450.                                         all variables,  and all method
  1451.                                         definitions for class named by
  1452.                                         self.  Example:
  1453.                                         releaseClass(Newint);
  1454.  
  1455.      1.18 Address Class
  1456.  
  1457.      Message        Argument(s)         Description
  1458.  
  1459.      asLong         self                returns self as Long value
  1460.      operator(*)    self                returns contents at address of self
  1461.                                         as Object
  1462.  
  1463.      1.19 Object Class
  1464.  
  1465.      Message        Argument(s)         Description
  1466.  
  1467.      parent         self                returns parent object of self if
  1468.                                         self is NOT a base class
  1469.      slot           self, String        returns value of class variable
  1470.                                         within self    with name = String
  1471.                                         argument.  This method only works
  1472.                                         from within methods defined for
  1473.                                         self's class !
  1474.      operator(&)    self                returns address of self as Address
  1475.                                         object
  1476.      replace        self, Object        replaces value of self with Object
  1477.                                         arg
  1478.  
  1479.      1.20 Field Class
  1480.  
  1481.      Message        Argument(s)         Description
  1482.  
  1483.      attr           self                returns the color attribute of self
  1484.      class          self                returns the String "Field"
  1485.      col            self                returns the column position of self
  1486.      name           self                returns the name of self
  1487.      num            self                returns the field number of self
  1488.      onKey          self, Int, Exp      called from Window::read() method
  1489.                                         whenever a key   is pressed from
  1490.                                         within the form; default is to call
  1491.                                            Int::executeKey() but can be
  1492.                                         re-defined to allow application
  1493.                                         to trap certain keys   Int arg =
  1494.                                         key to trap   Exp arg = expression
  1495.                                         to evaluate when key equal to Int
  1496.                                         arg is pressed
  1497.  
  1498.  
  1499.                                      - 25 -
  1500.  
  1501.  
  1502. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  1503.  
  1504.  
  1505.      row            self                returns the row position of self
  1506.      setPicture     self, String        sets the picture for self to String
  1507.                                         arg.   Special characters in
  1508.                                         format:   ! Converts letters to
  1509.                                         uppercase; accepts all characters
  1510.                                         A Allows letters only   L
  1511.                                         Translates characters to logical
  1512.                                         values (T, t, F, f, Y, y, N, n)   N
  1513.                                         Allows letters and numbers   9
  1514.                                         Allows digits only   X Allows
  1515.                                         numbers, spaces, signs, and decimal
  1516.                                         points only
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.                                      - 26 -
  1560.  
  1561.